<?php

namespace Admin\Controller;

class ConfigController extends CommonController
{
    var $site_info;

    function __construct()
    {
        parent::__construct();
        $this->site_info = M('Site_info');
    }

    function site_info()
    {
        if (IS_POST) {
            $this->site_info->create();
            $this->site_info->where("id=1")->save();
            $this->success('修改成功');

        } else {
            $site_info = $this->site_info->find(1);

            $this->assign('site_info', $site_info);

            $this->display();
        }
    }

    function update_password()
    {

        $this->display();
    }
    function clear_cache(){

       delDir(RUNTIME_PATH);



        $this->success('缓存清除成功',U('Index/index'));
    }
}